#pragma once

namespace MnistDigit
{
	class Scaler : std::unary_function<double, double>
	{
	public:
		Scaler(double x1, double x2, double y1, double y2);
		double operator()(double x) const;

	private:
		Scaler& operator=(const Scaler&);//no implementation
		static double CalculateACoefficient(double x1, double x2, double y1, double y2);
		static double CalculateBCoefficient(double x1, double x2, double y1, double y2);

		const double m_a;
		const double m_b;
	};

}